<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			const p = new Promise(function(resolve, reject) {
				var xhr = new XMLHttpRequest();
				xhr.open("get", "https://api.apiopen.top/api/sentences");
				xhr.send();
				xhr.onreadystatechange = function() {
					if (xhr.readyState == 4 && xhr.status == 200) {
						var jsonStr = xhr.responseText;
						resolve(jsonStr);
					}
				}
			});
			
			p.then(function(data){
				console.log(data);
			})
		</script>
	</body>
</html>
